<?php
/**
 * 广告验证器
 * @author maniac
 */
namespace app\common\validate;

class Ads extends Base
{
    // 验证规则
    protected $rule = [
        'title'       => 'require',
        'category_id' => 'require|number|gt:0',
        'image_id'    => 'require|number|gt:0',
    ];
    
    // 错误信息
    protected $message = [
        'title'       => '请输入广告标题',
        'category_id' => '请选择广告分类',
        'image_id'    => '请上传图片',
    ];
}
